Highly Efficient Convolutional Neural Networks

ABSTRACT

The present disclosure provides directed to new, more efficient neural network architectures. As one example, in some implementations, the neural network architectures of the present disclosure can include a linear bottleneck layer positioned structurally prior to and/or after one or more convolutional layers, such as, for example, one or more depthwise separable convolutional layers. As another example, in some implementations, the neural network architectures of the present disclosure can include one or more inverted residual blocks where the input and output of the inverted residual block are thin bottleneck layers, while an intermediate layer is an expanded representation. For example, the expanded representation can include one or more convolutional layers, such as, for example, one or more depthwise separable convolutional layers. A residual shortcut connection can exist between the thin bottleneck layers that play a role of an input and output of the inverted residual block.

RELATED APPLICATIONS

This application claims priority to and the benefit of U.S. Provisional Patent Application No. 62/586,007, titled “Highly Efficient Convolutional Neural Networks” and filed on Nov. 24, 2017. U.S. Provisional Patent Application No. 62/586,007 is hereby incorporated by reference herein in its entirety.

FIELD

The present disclosure relates generally to artificial neural networks (“neural networks”). More particularly, the present disclosure relates to efficient convolutional neural network structures for mobile and/or embedded vision applications and also to techniques to reduce computational costs and/or memory requirements associated with convolutional neural networks.

BACKGROUND

Convolutional neural networks have become the workhorse of computer vision and have achieved state of the art results in most major use cases. A general trend in the field of convolutional neural networks has been to make bigger and more complicated networks in order to achieve higher accuracy. As convolutional neural networks increase in size and complexity in service of increased accuracy, so too do they increase in computational cost. At a certain point, however, these advances yield diminishing returns, as adding complexity, size, and additional computation result in only small gains in accuracy.

The current trend toward bigger and more complicated networks is particularly problematic in the context of computing environments where certain computing resources, such as memory and processing capability, are limited. For example, mobile computing devices and/or embedded computing present challenging environments for the implementation of such large and complicated networks. Furthermore, in certain scenarios or applications, the problem to be solved by the network may not require a large, complex model that provides state of the art accuracy.

Thus, techniques for reducing computational costs and/or memory requirements of neural networks (e.g., convolutional neural networks) are desired. In some instances, such techniques can be referred to as performing neural network compression.

One general direction for neural network compression is network pruning, in which a subset of the connections included in a network is removed. However, if there are no constraints on which connections/parameters are to be removed, network pruning often results in an irregular network. Such a network is undesirable because computational savings cannot be easily exploited and the unstructured nature of connections requires extra efforts to represent. These drawbacks affect negatively on training time and memory usage. On the other hand, if the constraints on the parameters to be removed are too restrictive, the model flexibility is diminished.

Another direction for neural network compression brings optimization methods including genetic algorithms and reinforcement learning to architectural search. However one drawback is that the resulting networks end up being overly complex.

SUMMARY

Aspects and advantages of embodiments of the present disclosure will be set forth in part in the following description, or can be learned from the description, or can be learned through practice of the embodiments.

One example aspect of the present disclosure is directed to a computing system that includes one or more processors and one or more non-transitory computer-readable media that store a convolutional neural network implemented by the one or more processors. The convolutional neural network includes one or more convolutional blocks. Each of the one or more convolutional blocks includes a linear bottleneck layer and one or more convolutional layers.

Another example aspect of the present disclosure is directed to a computing system that includes one or more processors and one or more non-transitory computer-readable media that store a convolutional neural network implemented by the one or more processors. The convolutional neural network includes one or more inverted residual blocks. Each of the one or more inverted residual blocks includes one or more convolutional layers configured to provide a first output and a linear bottleneck layer configured to receive the first output and generate a second output. The linear bottleneck layer is further configured to receive a residual and add the residual to the second output to provide a third output.

Another example aspect of the present disclosure is directed to a computing system that includes one or more processors and one or more non-transitory computer-readable media that store a convolutional neural network implemented by the one or more processors. The convolutional neural network includes one or more convolutional blocks. Each of the one or more convolutional blocks includes a linear layer and one or more non-linear convolutional layers.

Another example aspect of the present disclosure is directed to a computing system that includes one or more processors and one or more non-transitory computer-readable media that store a convolutional neural network implemented by the one or more processors. The convolutional neural network includes one or more inverted residual blocks. Each of the one or more inverted residual blocks includes one or more convolutional layers configured to provide a first output and a linear layer configured to receive the first output and generate a second output. The linear layer is further configured to receive a residual and add the residual to the second output to provide a third output.

Another example aspect of the present disclosure is directed to a computing system that includes one or more processors and one or more non-transitory computer-readable media that store a convolutional neural network implemented by the one or more processors. The convolutional neural network includes one or more inverted residual blocks. Each of the one or more inverted residual blocks includes a linear bottleneck layer that provides a first output and one or more convolutional layers that receive the first output and generate a second output. The linear bottleneck layer is configured to provide a residual that describes the first output to a downstream linear bottleneck layer via a residual shortcut connection.

Another example aspect of the present disclosure is directed to a neural network system implemented by one or more computers. The neural network system is configured to receive an input image and to generate an output for the input image. The neural network system includes a convolutional subnetwork. The convolutional subnetwork includes a linear bottleneck layer and one or more convolutional layers.

Another example aspect of the present disclosure is directed to a neural network system implemented by one or more computers. The neural network system is configured to receive an input image and to generate an output for the input image. The neural network system includes an inverted residual subnetwork. The inverted residual subnetwork includes one or more convolutional layers configured to provide a first output and a linear layer configured to receive the first output and generate a second output. The linear layer is further configured to receive a residual and add the residual to the second output to provide a third output.

Other aspects of the present disclosure are directed to various systems, apparatuses, non-transitory computer-readable media, user interfaces, and electronic devices.

These and other features, aspects, and advantages of various embodiments of the present disclosure will become better understood with reference to the following description and appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate example embodiments of the present disclosure and, together with the description, serve to explain the related principles.

BRIEF DESCRIPTION OF THE DRAWINGS

Detailed discussion of embodiments directed to one of ordinary skill in the art is set forth in the specification, which makes reference to the appended figures, in which:

FIG. 1A depicts a block diagram of an example computing system according to example embodiments of the present disclosure.

FIG. 1B depicts a block diagram of an example computing device according to example embodiments of the present disclosure.

FIG. 1C depicts a block diagram of an example computing device according to example embodiments of the present disclosure.

FIG. 2A depicts a graphical diagram of example standard convolution filters according to example embodiments of the present disclosure.

FIG. 2B depicts a graphical diagram of example depthwise convolutional filters according to example embodiments of the present disclosure.

FIG. 2C depicts a graphical diagram of example pointwise convolutional filters according to example embodiments of the present disclosure.

FIGS. 3A and 3B depict graphical diagrams of example convolutional blocks according to example embodiments of the present disclosure.

FIG. 4 depicts a graphical diagram of an example inverted residual block according to example embodiments of the present disclosure.

FIG. 5A depicts a flow diagram of an example convolutional block according to example embodiments of the present disclosure.

FIG. 5B depicts a flow diagram of an example inverted residual block according to example embodiments of the present disclosure.

FIG. 6 depicts example experimental results for example embodiments of the present disclosure.

FIGS. 7A and 7B depict example experimental results for example embodiments of the present disclosure.

Reference numerals that are repeated across plural figures are intended to identify the same features in various implementations.

DETAILED DESCRIPTION 1. Overview

Example aspects of the present disclosure are directed to new, more efficient neural network architectures. As one example, in some implementations, the neural network architectures of the present disclosure can include a linear bottleneck layer positioned structurally prior to and/or after one or more convolutional layers, such as, for example, one or more depthwise separable convolutional layers. As another example, in some implementations, the neural network architectures of the present disclosure can include one or more inverted residual blocks where the input and output of the inverted residual block are thin bottleneck layers, while an intermediate layer is an expanded representation. For example, the expanded representation can include one or more convolutional layers, such as, for example, one or more depthwise separable convolutional layers. According to another aspect of the present disclosure, a residual shortcut connection can exist between the thin bottleneck layers that play a role of an input and output of the inverted residual block. Further, as described above, the bottleneck layers can be linear in nature. The neural network architectures described herein have been shown to improve the state of the art performance of mobile-optimized models on multiple benchmarks across a spectrum of different sizes, while also reducing the amount of memory and processing resources required for implementation.

More particularly, neural networks have revolutionized many areas of machine intelligence, enabling superhuman accuracy for challenging image recognition tasks. However, the drive to improve accuracy often comes at a cost: modern state of the art networks require high computational resources beyond the capabilities of many mobile and embedded applications.

In contrast, the present disclosure introduces new, more efficient neural network architectures that are especially beneficial for mobile and resource constrained environments. The networks described herein push the state of the art for mobile tailored computer vision models, by significantly decreasing the number of operations and memory needed while retaining the same accuracy.

According to one aspect of the present disclosure, a neural network can include one or more convolutional blocks. The term “block” generally refers to a defined structure of one or more layers within a network and can also be referred to as a module or a subnetwork. Each convolutional block can include a linear bottleneck layer and one or more convolutional layers. The convolutional layer(s) can perform non-linear transformation(s). Thus, in contrast to certain existing network structures which rely solely on non-linear layers, certain implementations of the present disclosure can include a bottleneck layer that performs a linear transformation on its input data.

In some implementations, the one or more convolutional layers can be or include one or more separable convolutional layers. For example, each separable convolutional layer can be configured to separately apply both a depthwise convolution and a pointwise convolution during processing of an input.

According to another aspect of the present disclosure, the linear bottleneck layer can operate or otherwise represent data in a first dimensional space, while the one or more convolutional layers (e.g., separable convolutional layers) can operate or otherwise represent data in a second dimensional space, where the second dimensional space includes a larger number of dimensions. As examples, the linear bottleneck layer can represent data in a first tensor, while the one or more convolutional layers can represent data one or more a second tensors, where each of the one or more second tensors includes a larger Euclidean space than the first tensor. Thus, the linear bottleneck layer can be configured to operate (e.g., perform a linear transformation) in a low dimensional space while the one or more convolutional layers are configured to operate (e.g., perform one or more non-linear transformations) in a high dimensional space. As such, the convolutional layers can, in some instances, be referred to as “expansion convolutional layers”.

This dimensional structure enables a natural separation between the input and output domains of the convolutional blocks. This allows a decoupling of the input/output domains from the expressiveness of the transformation, which provides a convenient framework for analysis. In particular, this dimensional structure can enable a natural separation between the input/output domain of the building blocks (e.g., bottleneck layers) and the layer transformation—that is a non-linear function that converts input to the output. The former can be seen as the capacity of the network at each layer, whereas the latter as the expressiveness. This is in contrast with traditional convolutional network structures, where both expressiveness and capacity are tangled together and are functions of the output's layers depth.

Further, due to this alternating dimensional structure, in some instances the convolutional blocks can be referred to as “mixed-linearity convolutional blocks” and/or “alternating-linearity convolutional blocks.”

In some implementations, a neural network can include a plurality of the convolutional blocks that are stacked one after another. Thus, in some implementations, the linear bottleneck layer of a particular convolutional block can take as input (e.g., perform a linear transformation on) the output of the convolutional layers of a previous convolutional block (e.g., the previous sequential convolutional block).

Thus, in a stacked configuration, a neural network can include a number of linear bottleneck layers interleaved with a number of non-linear convolutional layers (e.g., separable convolutional layers). As such, depending on how the convolutional blocks are defined, the linear bottleneck layer for each block can be positioned structurally prior to or after the corresponding convolutional layer(s) for such block.

Another main contribution of the present disclosure is a novel layer module: the inverted residual block with linear bottleneck. The inverted residual block can be similar to the convolutional block described above, but can further include the passing of residual information between layers (e.g., between linear bottleneck layers) via a residual shortcut connection.

In some implementations, the inverted residual block can include a one or more convolutional layers configured to provide a first output and a linear bottleneck layer configured to receive the first output and generate a second output. In addition, the linear bottleneck layer can be further configured to receive a residual and add the residual to the second output to provide a third output.

As one example, the linear bottleneck layer can receive the residual from the linear bottleneck layer of a previous inverted residual block (e.g., the previous sequential inverted residual block). More particularly, in some implementations, a plurality of inverted residual blocks can be stacked one after the other and each inverted residual block can include a linear bottleneck layer that receives a residual from the linear bottleneck layer from a previous block (e.g., the previous sequential block) and/or provides a residual to the linear bottleneck layer of a subsequent block (e.g., the next sequential block). For example, the residuals can be provided via respective residual shortcut connections. In another example, the linear bottleneck layer for an inverted residual block (e.g., an initial inverted residual block of the network) can receive the residual from an initial linear bottleneck layer structurally positioned prior to the one or more convolutional layers of such at least one inverted residual block.

As described above, the linear bottleneck layer(s) can be configured to operate in a lower dimensional space than the convolutional layers. Thus, in one example, the inverted residual block can take as input a low dimensional compressed representation which is first expanded to high dimension and filtered with convolutional layer(s) (e.g., light weight depthwise convolution(s)). Features can be subsequently projected back to a low dimensional representation with a linear convolution.

Similar to the convolutional blocks, the dimensional structure of the inverted residual blocks enables a natural separation between the input and output domains of the convolutional blocks (e.g., the capacity of the blocks) and the layer transformation of the blocks (e.g., the expressiveness of the blocks). This allows a decoupling of the input/output domains from the expressiveness of the transformation, which provides a convenient framework for analysis.

The present disclosure provides a number of technical effects and benefits. As one example technical effect and benefit, the neural network structures provided by the present disclosure can be efficiently implemented using standard operations in any modern framework. As one example technical effect and benefit, the neural network structures provided by the present disclosure have been demonstrated to achieve or beat state of the art networks along multiple performance points using standard benchmarks. Thus, the present disclosure represents an advance in the performance of the networks themselves.

Further, the convolutional block designs described herein are particularly suitable for mobile designs. In particular, as another example technical effect and benefit, the neural network structures of the present disclosure significantly reduce the memory footprint needed during inference because they never fully materialize large intermediate tensors. This reduces the need for main memory access in many modern devices (e.g., embedded hardware designs) that provide small amounts of extremely fast memory (e.g., very fast software-controlled cache memory). Reducing the number of access and/or compute operations required also improves the speed at which inference can be performed while reducing the number of processing resources consumed. Thus, in addition to an advance in the performance of the networks themselves, the present disclosure provides significant improvements which reduce memory and processing resource usage, thereby improving inference speed.

With reference now to the Figures, example embodiments of the present disclosure will be discussed in further detail.

2. Example Devices and Systems

FIG. 1A depicts a block diagram of one example computing system 100 that can implement the present disclosure. The system 100 includes a user computing device 102, a server computing system 130, and a training computing system 150 that are communicatively coupled over a network 180.

The user computing device 102 can be any type of computing device, such as, for example, a personal computing device (e.g., laptop or desktop), a mobile computing device (e.g., smartphone or tablet), a gaming console or controller, a wearable computing device, an embedded computing device, or any other type of computing device. In some implementations, the device 102 is not necessarily a device associated with a user but instead can be any arbitrary mobile or embedded device or system.

The user computing device 102 includes one or more processors 112 and a memory 114. The one or more processors 112 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, a FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 114 can include one or more non-transitory computer-readable storage mediums, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 114 can store data 116 and instructions 118 which are executed by the processor 112 to cause the user computing device 102 to perform operations.

The user computing device 102 can store or include one or more machine-learned models 120. For example, the machine-learned models 120 can be or can otherwise include various machine-learned models such as neural networks (e.g., deep neural networks) or other multi-layer linear and/or non-linear models. Neural networks can include recurrent neural networks (e.g., long short-term memory recurrent neural networks), feed-forward neural networks, convolutional neural networks (e.g., MobileNets) or other forms of neural networks.

In some implementations, the one or more machine-learned models 120 can be received from the server computing system 130 over network 180, stored in the user computing device memory 114, and the used or otherwise implemented by the one or more processors 112. In some implementations, the user computing device 102 can implement multiple parallel instances of a single machine-learned model 120.

Additionally or alternatively, one or more machine-learned models 140 can be included in or otherwise stored and implemented by the server computing system 130 that communicates with the user computing device 102 according to a client-server relationship. For example, the machine-learned models 140 can be implemented by the server computing system 140 as a portion of a web service. Thus, one or more models 120 can be stored and implemented at the user computing device 102 and/or one or more models 140 can be stored and implemented at the server computing system 130.

The user computing device 102 can also include one or more user input component 122 that receives user input. For example, the user input component 122 can be a touch-sensitive component (e.g., a touch-sensitive display screen or a touch pad) that is sensitive to the touch of a user input object (e.g., a finger or a stylus). The touch-sensitive component can serve to implement a virtual keyboard. Other example user input components include a microphone, a traditional keyboard, or other means by which a user can enter a communication.

The server computing system 130 includes one or more processors 132 and a memory 134. The one or more processors 132 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, a FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 134 can include one or more non-transitory computer-readable storage mediums, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 134 can store data 136 and instructions 138 which are executed by the processor 132 to cause the server computing system 130 to perform operations.

In some implementations, the server computing system 130 includes or is otherwise implemented by one or more server computing devices. In instances in which the server computing system 130 includes plural server computing devices, such server computing devices can operate according to sequential computing architectures, parallel computing architectures, or some combination thereof.

The server computing system 130 can train the machine-learned models 140 via interaction with the training computing system 150 that is communicatively coupled over the network 180. The training computing system 150 can be separate from the server computing system 130 or can be a portion of the server computing system 130.

The training computing system 150 includes one or more processors 152 and a memory 154. The one or more processors 152 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, a FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 154 can include one or more non-transitory computer-readable storage mediums, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 154 can store data 156 and instructions 158 which are executed by the processor 152 to cause the training computing system 150 to perform operations. In some implementations, the training computing system 150 includes or is otherwise implemented by one or more server computing devices.

The training computing system 150 can include a model trainer 160 that trains the machine-learned models 140 stored at the server computing system 130 using various training or learning techniques, such as, for example, backwards propagation of errors. In some implementations, performing backwards propagation of errors can include performing truncated backpropagation through time. The model trainer 160 can perform a number of generalization techniques (e.g., weight decays, dropouts, etc.) to improve the generalization capability of the models being trained. In particular, the model trainer 160 can train a machine-learned model 140 based on a set of training data 142.

In some implementations, if the user has provided consent, the training examples can be provided by the user computing device 102. Thus, in such implementations, the model 120 provided to the user computing device 102 can be trained by the training computing system 150 on user-specific data received from the user computing device 102. In some instances, this process can be referred to as personalizing the model.

The model trainer 160 includes computer logic utilized to provide desired functionality. The model trainer 160 can be implemented in hardware, firmware, and/or software controlling a general purpose processor. For example, in some implementations, the model trainer 160 includes program files stored on a storage device, loaded into a memory and executed by one or more processors. In other implementations, the model trainer 160 includes one or more sets of computer-executable instructions that are stored in a tangible computer-readable storage medium such as RAM hard disk or optical or magnetic media.

The network 180 can be any type of communications network, such as a local area network (e.g., intranet), wide area network (e.g., Internet), or some combination thereof and can include any number of wired or wireless links. In general, communication over the network 180 can be carried via any type of wired and/or wireless connection, using a wide variety of communication protocols (e.g., TCP/IP, HTTP, SMTP, FTP), encodings or formats (e.g., HTML, XML), and/or protection schemes (e.g., VPN, secure HTTP, SSL).

FIG. 1A illustrates one example computing system that can be used to implement the present disclosure. Other computing systems can be used as well. For example, in some implementations, the user computing device 102 can include the model trainer 160 and the training dataset 162. In such implementations, the communication assistance models 120 can be both trained and used locally at the user computing device 102. In some of such implementations, the user computing device 102 can implement the model trainer 160 to personalize the communication assistance models 120 based on user-specific data.

FIG. 1B depicts a block diagram of an example computing device 10 that performs communication assistance according to example embodiments of the present disclosure. The computing device 10 can be a user computing device or a server computing device.

The computing device 10 includes a number of applications (e.g., applications 1 through N). Each application contains its own machine learning library and machine-learned model(s). For example, each application can include a machine-learned communication assistance model. Example applications include a text messaging application, an email application, a browser application, a photograph storage and management application, etc.

As illustrated in FIG. 1B, each application can communicate with a number of other components of the computing device, such as, for example, one or more sensors, a context manager, a device state component, and/or additional components. In some implementations, each application can communicate with each device component using an API (e.g., a public API). In some implementations, the API used by each application is specific to that application.

FIG. 1C depicts a block diagram of an example computing device 50 that performs communication assistance according to example embodiments of the present disclosure. The computing device 50 can be a user computing device or a server computing device.

The computing device 50 includes a number of applications (e.g., applications 1 through N). Each application is in communication with a central intelligence layer. Example applications include a text messaging application, an email application, a photograph storage and management application, a browser application, etc. In some implementations, each application can communicate with the central intelligence layer (and model(s) stored therein) using an API (e.g., a common API across all applications).

The central intelligence layer includes a number of machine-learned models. For example, as illustrated in FIG. 1C, a respective machine-learned model (e.g., a communication assistance model) can be provided for each application and managed by the central intelligence layer. In other implementations, two or more applications can share a single machine-learned model. For example, in some implementations, the central intelligence layer can provide a single model (e.g., a single communication assistance model) for all of the applications. In some implementations, the central intelligence layer is included within or otherwise implemented by an operating system of the computing device 50.

The central intelligence layer can communicate with a central device data layer. The central device data layer can be a centralized repository of data for the computing device 50. As illustrated in FIG. 1C, the central device data layer can communicate with a number of other components of the computing device, such as, for example, one or more sensors, a context manager, a device state component, and/or additional components. In some implementations, the central device data layer can communicate with each device component using an API (e.g., a private API).

3. Example Network Structures 3.1 Example Depthwise Separable Convolutions

Depthwise separable convolutions can be a key building block for building efficient neural networks. The basic idea is to replace a full convolutional operator with a factorized version that splits convolution into two separate layers. In some implementations, the first layer is called a depthwise convolution and applies lightweight filtering by applying a single convolutional filter per input channel. In such implementations, the second layer is a 1×1 convolution, called a pointwise convolution, which is responsible for building new features through computing linear combinations of the input channels. Thus, in some implementations, the depthwise convolution applies a single filter to each input channel. The pointwise convolution then applies a 1×1 convolution to combine the outputs the depthwise convolution.

FIGS. 2A-C show how a standard convolution (FIG. 2A) can be factorized into a depthwise convolution (FIG. 2B) and a 1×1 pointwise convolution (FIG. 2C).

A standard convolution both filters and combines inputs into a new set of outputs in one step. The depthwise separable convolution splits this into two layers, a separate layer for filtering and a separate layer for combining. This factorization has the effect of drastically reducing computation and model size.

In particular, a standard convolution can take an h_(i)×w_(i)×d_(i) input tensor L_(i) and apply a convolutional kernel K∈R^(k×k×d) ^(i) ^(×d) ^(j) to produce L_(j) an h_(i)×w_(i)×d_(j) output tensor. Standard convolutional layers have the computational cost of:

h _(i) ·w _(i) ·d _(i) ·d _(j) ·k·k  (1)

where the computational cost depends multiplicatively on all of the terms.

Depthwise separable convolutions can be a drop in replacement for standard convolutional layers but only cost:

h _(i) ·w _(i) ·d _(i) ·k·k+h _(i) ·w _(i) ·d _(i) ·d _(j)  (2)

which is the sum of the depthwise and 1×1 pointwise convolutions.

Depthwise separable convolution reduces computation compared to traditional computation layers by a factor of:

$\begin{matrix} {\frac{1}{d_{j}} + \frac{1}{k^{2}}} & (3) \end{matrix}$

In some example implementations of the neural network structures of the present disclosure, a convolutional neural network can use k=3 (3×3 depthwise separable convolutions) so the computational cost is 8 to 9 times less than standard convolutions at only a small reduction in accuracy.

3.2 Example Discussion of Linear Bottlenecks

Consider a deep neural network consisting of n layers. Looking at layer L_(i), such layer has an activation tensor of dimensions h_(i)×w_(i)×d_(i). Throughout this section, the basic properties of these activation tensors will be discussed, which will be treated as containers of h_(i)×w_(i) “pixels” with d_(i) dimensions. Informally for layer i its “manifold of interest” will refer to the set of observable high-dimensional pixels, when the input is a real image. Obviously, such a manifold is not directly expressible, but various properties of it can be empirically studied. For example, it has been assumed that such manifolds of interest in neural networks could be embedded in a low-dimensional subspace. In other words, when one looks at all individual d-channel pixels of a deep convolutional layer, the information encoded in those values actually lie in some manifold, which in turn is embeddable into a low-dimensional subspace. Note, however, that dimensionality of the manifold differs from the dimensionality of a subspace that could be embedded via linear transformation.

At a first glance, such a fact could then be captured and exploited by simply reducing the dimensionality of a layer by reducing the dimensionality of the operating space. However, this intuition breaks down when it is considered that deep convolutional neural networks actually have non-linear per coordinate transformations, such as relu. For example relu applied to a line in 1-d space results in a ‘ray’, whereas in

² space, for general orientation it results in piece-wise linear curve with n-joints. It can be seen that in general if a result of a layer transformation relu Bx is a non-zero volume S, the points that map to the interior of this set interior S are obtained via a linear transformation B of the input, thus indicating that the part of the input space corresponding to full dimensional output, is limited to linear transformation. In other words, the deep networks only have the power of a linear classifier on the non-zero volume part of the output domain.

This suggests that if the output manifold has non-zero volume part V, the input that maps into V is mapped via a linear transformation. On the other hand, when relu collapses the volume it inevitably loses information. However, it can also be shown that if the input manifold is embeddable into significantly lower dimensional subspace of the enclosing space then the relu transformation generally preserves the information while introducing the much needed complexity into the set of expressible functions.

To summarize, aspects of the present disclosure recognize and leverage two properties that indicate that the manifold of interest should lie in low dimensional subspace of the higher dimensional space. First, the non-zero volume sets after passing through a neural network correspond to a linear transformation. Second, relu is capable of preserving complete information about the input manifold, but only if the input domain lies in low dimensional subspace of the input space.

Aspects of the present disclosure can optimize existing neural architectures based on these principles. Since the manifold of interest is low dimensional, this can be captured by inserting linear bottleneck layers into convolutional blocks. Linear layers can prevent non-linearity from destroying too much information. The ratio between the size of an input bottleneck to the inner size can be referred to as an expansion ratio.

3.3 Example Convolutional Blocks

FIGS. 3A and 3B depict graphical diagrams of example convolutional blocks according to example embodiments of the present disclosure.

Referring first to FIG. 3A, a first example convolutional block 300 is depicted. The term “block” generally refers to a defined structure of one or more layers within a network and can also be referred to as a module or a subnetwork. A neural network can include one or more of the convolutional blocks 300. For example, a plurality of the blocks 300 can be stacked one after the other.

The example convolutional block 300 includes a linear bottleneck layer 302 and an expansion convolutional block that includes depthwise convolutional layers 304 and pointwise convolutional layers 306.

According to another aspect of the present disclosure, the linear bottleneck layer 302 can operate or otherwise represent data in a first dimensional space, while the one or more convolutional layers (e.g., separable convolutional layers 304 and 306) can operate or otherwise represent data in a second dimensional space, where the second dimensional space includes a larger number of dimensions. Thus, the linear bottleneck layer 302 can be configured to operate (e.g., perform a linear transformation) in a low dimensional space while the one or more convolutional layers 304 and 306 are configured to operate (e.g., perform one or more non-linear transformations) in a high dimensional space. As such, the convolutional layers 304 and 306 can be referred to as “expansion convolutional layers” or together as an “expansion convolution block”.

Thus, in contrast to certain existing network structures which rely solely on non-linear layers, the convolutional block 300 can include a bottleneck layer 302 that performs a linear transformation on its input data.

This dimensional structure enables a natural separation between the input and output domains of the convolutional blocks. This allows a decoupling of the input/output domains from the expressiveness of the transformation, which provides a convenient framework for analysis. Further, due to this alternating dimensional structure, in some instances the convolutional blocks can be referred to as “mixed-linearity convolutional blocks” and/or “alternating-linearity convolutional blocks.”

Following the pointwise convolutional layers 306 is a second linear bottleneck layer 312. As one example, in some implementations, the second linear bottleneck layer 312 can be the linear bottleneck layer of a subsequent iteration of the convolutional block 300. For example, this relationship (i.e., that the layer 312 belongs to a subsequent block) is denoted by the lighter shading applied in the layer 312 in FIG. 3A. This convention of lighter shading denoting that the lighter shaded layer belongs to a subsequent block is continued throughout the Figures.

Thus, in some implementations, the linear bottleneck layer (e.g., 312) of a subsequent convolutional block can take as input (e.g., perform a linear transformation on) the output of the convolutional layers (e.g., 304 and 306) of a previous convolutional block (e.g., block 300).

Thus, in a stacked configuration, a neural network can include a number of linear bottleneck layers interleaved with a number of non-linear convolutional layers (e.g., separable convolutional layers). As such, depending on how the convolutional blocks are defined, the linear bottleneck layer for each block can be positioned structurally prior to or after the corresponding convolutional layer(s) for such block.

For example, by changing the convention by which the blocks are defined, the ordering of the linear bottleneck layer and the convolutional layer(s) can be switched. For example, FIG. 3B illustrates this principle.

FIG. 3B depicts a graphical diagram of another example convolutional block 350. The convolutional block 350 includes depthwise convolutional layers 352 and pointwise convolutional layers 354. The layers 352 and 354 can operate similar to the layers 304 and 306 described above with reference to FIG. 3A.

Referring still to FIG. 3B, following the convolutional layers 352 and 354 is a linear bottleneck layer 356. The linear bottleneck layer 356 can operate similar to the layers 302 and/or 312 described above with reference to FIG. 3A.

Referring still to FIG. 3B, following the linear bottleneck layer 356 are one or more additional convolutional layers 362. For example, the additional convolutional layers 362 can be separable convolutional layers such that one or more additional depthwise convolutional layers immediately follow the linear bottleneck layer 356.

Thus, referring to both FIGS. 3A and 3B, it can be seen that example convolutional blocks can include linear bottleneck layers positioned structurally prior to and/or after one or more convolutional layers (e.g., convolutional layers such as separable convolutional layers that perform non-linear transformations). In fact, in practice, the example blocks 300 and 350 are equivalent when respectively placed into a stacked configuration. In some implementations, an initial and/or a final block in the stack can include two linear bottleneck layers.

As another example, FIG. 5A depicts a flow diagram of another example convolutional block according to example embodiments of the present disclosure.

3.4 Example Inverted Residual Blocks

FIG. 4 depicts a graphical diagram of an example inverted residual block 400 according to example embodiments of the present disclosure. The inverted residual block 400 can be similar to the convolutional blocks 300 and 350 described above, but can further include the passing of residual information between layers (e.g., between linear bottleneck layers 402 and 412) via a residual shortcut connection 408.

More particularly, the example inverted residual block 400 can include a linear bottleneck layer 402. Following the linear bottleneck layer 402, the block 400 can further include one or more convolutional layers. For example, as illustrated in FIG. 4, the block 400 can further include a plurality of depthwise convolutional layers 404 and a plurality of pointwise convolutional layers 406. For example, these layers 404 and 406 can be referred to as expansion convolutional layers or an expansion convolution block.

A second linear bottleneck layer 412 can follow the convolutional layers 404 and 406. As one example, in some implementations, the second linear bottleneck layer 312 can be the linear bottleneck layer of a subsequent iteration of the inverted residual block 400.

Thus, in some implementations, the linear bottleneck layer (e.g., 412) of a subsequent inverted residual block can take as input (e.g., perform a linear transformation on) the output of the convolutional layers (e.g., 404 and 406) of a previous convolutional block (e.g., block 400).

Furthermore, according to an aspect of the present disclosure, the linear bottleneck layer 402 can be configured to provide a residual to the second linear bottleneck layer 412 via a residual shortcut connection 408. The second linear bottleneck layer 412 can be configured to add the residual to the output it generates by transforming the output of the pointwise convolutional layers 406. This pattern can be repeatable. That is, similar to layer 412, the linear bottleneck layer 402 can receive a residual from a previous linear bottleneck layer of a previous inverted residual block (e.g., the previous sequential inverted residual block) (not shown). Likewise, the linear bottleneck layer 412 can itself provide a residual to the linear bottleneck layer of a subsequent block (e.g., the next sequential block) (not shown).

One motivation for inserting shortcuts is similar to that of classical residual connections: to improve the ability of a gradient to propagate across multiple layers. However, the inverted design is considerably more memory efficient, as well as providing improved performance.

Furthermore, in the networks described herein, layers are removable. For example, a convolutional block (e.g., an inverted residual block) can be removed and the rest of the network can be rewired, without requiring any retraining, with only a modest cost to the accuracy.

As another example, FIG. 5B depicts a flow diagram of another example inverted residual block according to example embodiments of the present disclosure.

Particular layer, filter, or kernel sizes illustrated in FIGS. 3A-B, 4, and 5A-B are provided as examples only.

4. Example Network Implementations

The example architecture of one example model implementation (referred to as “MobileNet V2”) will now be described in detail. This example is provided of one example of a possible implementation of aspects of the present disclosure. The present disclosure is not limited by or to the example implementation.

As described in the previous sections, the basic building block can be bottleneck depth-separable convolutions with residuals. The architecture of Mobilenet V2 can contain the initial fully convolution layer with 32 filters, followed by 19 residual bottleneck layers as listed in the Table 2. Relu6 can be used as the source of non-linearity, because of its robustness properties when used with low-precision computation. Kernel size 3×3 can be used, as is standard for modern network. During training, dropout and batch normalization can be utilized.

With the exception of first layer, the example architecture can use constant expansion rate throughout the network. Expansion rates between 5 and 10 result in nearly identical performance curve, with smaller networks being better off with slightly smaller expansion rates and larger networks having slightly better performance with larger expansion rates.

In some example experiments performed on example implementations of the present disclosure, an expansion factor of 6 was consistently applied to the size of the input tensor. For example for a bottleneck layer that takes 64-channel input tensor and produces a tensor of size 128 channels, the intermediate expansion layer is then 64*6=384 channels.

TABLE 1 Bottleneck residual block transforming from k to k′ channels, with stride s, and expansion factor t. input Operator Output h × w × k  1 × 1 conv2d + relu6 h × w × (tk) h × w × tk 3 × 3 dwise with stride = s, + relu6 h/s × w/s × (tk) h/s × w/s × tk linear 1 × 1 conv2d h/s × w/s × k′  

TABLE 2 Example Mobilenet V2 architecture. Each line describes a sequence of 1 or more identical (modulo stride) layers, according to # of reps. The last layer in each block can have stride 1 or 2. Fewer stride 2 blocks can be used to preserve layout of internal tensors. The expansion can be consistently applied to the input tensor. Input Operator Exp factor # output channels # reps first stride 224 × 224 × 3       conv2d, 3 × 3 — 32 1 2 112 × 112 × 32  bottleneck residual, 3 × 3, 1 16 1 1 112 × 112 × 16 bottleneck residual, 3 × 3 6 24 2 2 56 × 56 × 24 bottleneck residual, 3 × 3 6 32 3 2 28 × 28 × 32 bottleneck residual, 3 × 3 6 64 4 2 28 × 28 × 64 bottleneck residual, 3 × 3 6 96 3 1 14 × 14 × 96 bottleneck residual, 3 × 3 6 160 3 2  7 × 7 × 160 bottleneck residual, 3 × 3 6 310 1 1  7 × 7 × 320       conv2d 1 × 1 — 1280 1 1   7 × 7 × 1280      avgpool, 7 × 7 — — 1 — 1 × 1 × k        conv2d, 1 × 1 — k —

Trade-off hyper parameters: The architecture can be tailored to different performance points, by using the input image resolution and width multiplier as tunable hyper parameters that can be adjusted depending on desired accuracy/performance trade-offs. One example network (multiplier 1, 224×224), has computational cost 300 million multiply-adds and uses 3.4 million parameters. The performance trade-offs were explored for input resolutions from 96 to 224, and width multipliers of 0.35 to 1.5. The network computational cost ranges from 7 multiply adds to 920-Multiply adds, while the model size vary between 1.7 M and 5.3 M. For multipliers less than one, the width multiplier can be applied to all layers except the very last convolutional layer. This improves performance for smaller models.

5. Example Implementation Notes 5.1 Example Memory Efficient Inference

The inverted residual bottleneck layers allow a particularly memory efficient implementation which is very important for mobile applications. A standard efficient implementation of inference that uses for instance Tensorflow or Caffe, can build a directed acyclic compute hypergraph G, consisting of edges representing the operations and nodes representing tensors of intermediate computation. The computation is scheduled in order to minimize the total number of tensors that needs to be stored in memory. In a most general case it searches over all plausible computation orders X(G) and picks the one that minimizes:

$\left. {{M(G)} = {{\underset{\pi \in {\sum i} \in {1{\ldots n}}}{\min\mspace{11mu}\max}\left\lbrack {\sum\limits_{A \in {R{({i,\pi,G})}}}^{\;}{A}} \right\rbrack} + {{size}\left( \pi_{i} \right)}}} \right).$

where R(i, π, G) is the list of intermediate tensors that are connected to any of π_(i) . . . π_(n) nodes, |A| represents the size of node |A| and size(i) is the total amount of memory needed for internal storage during operation i.

For graphs that have only trivial parallel structure (such as residual connection), there is only one non-trivial feasible computation order, and thus the total amount and a bound on the memory needed for inference on compute graph G can be simplified:

${M(G)} = {\max\limits_{{op} \in G}\left\lbrack {\sum\limits_{A \in {op}_{inp}}^{\;}{{A\left. {{+ {\sum\limits_{B \in {op}_{out}}^{\;}{B}}} + {{op}}} \right\rbrack}}} \right.}$

Stated differently, the amount of memory is then simply the maximum total size of combined inputs and outputs across all tensors. In what follows, it is shown that if the bottleneck residual block is treated as a single operation (and inner convolution is treated as disposable tensor), the total amount of memory then would be dominated by the size of bottleneck tensors, rather than the size of tensors that are internal to bottleneck (and much larger).

Bottleneck Residual Block: In some implementations, a bottleneck block operator F(x) can be expressed as a composition of three operators F(x)=[A·

·B]x, where A is a linear transformation A: R^(s×s×k)→R^(s×s×n),

is a non-linear per channel transformation:

: R^(s×s×n)→R^(s′×s′×n), and B is again a linear transformation to the output domain: B: R^(s′×s′×n)→R^(s′×s′×k′).

For certain example implementations of the aspects described herein,

=relu6-dwise·relu6×, but the results apply to any per-channel transformation. Suppose the size of the input domain is |x| and the size of the output domain is |y|, then F(X) can use only |s² k|+|s′² k′|+O(max(s², s′²)) memory.

Example algorithms can be based on the fact that the inner tensor I can be represented as concatenation of t tensors, of size n/t each and the function can then be represented as:

${F(x)} = {\sum\limits_{i = 1}^{t}{\left( {A_{i} \cdot N \cdot B_{i}} \right)(x)}}$

By accumulating the sum, only one intermediate block of size n/t is required to be kept in memory at all times. Using n=t, one can end up having to keep only a single channel of the intermediate representation at all times. The two constraints that enabled use of this trick are: (a) the fact that the inner transformation (which can include non-linearity and depthwise) is per channel, and (b) the consecutive non-per channel operators have significant ratio of the input size to the output. For most of the traditional neural networks, such trick would not produce a significant improvement.

Note that the number of multiply-adds operators needed to compute F(X) using t-way split is independent of t, however in existing implementations it was found that replacing one matrix multiplication with several smaller ones hurts run-time performance due to increased cache misses. This approach was found to be the most helpful when used with t being a small constant between 2 and 5, which significantly reduces the memory requirement and still allows utilization of most of the efficiencies gained by using highly optimized matrix multiplication and convolution operators provided by deep learning frameworks. Special framework level optimization may lead to further runtime improvements.

6. Example Applications and Experiments

The networks and network structures described by the present disclosure can be used to solve a number of different problems or applied to a number of different tasks. Example experiments of example implementations of aspects of the present disclosure are provided below. These are provided as examples only. The present disclosure is not limited to or by these examples.

6.1 ImageNet Classification

As one example, a convolutional neural network that includes one or more of the structures described herein can be trained to perform image classification.

Example training setup: Training can be performed using Tensorflow. Standard RMSPropOptimizer with both decay and momentum set to 0.9 can be used. Batch normalization can be used after every layer, and the standard weight decay can be set to 0.00004. An initial learning rate of 0.045 can be used with a learning rate decay rate of 0.98 per epoch. Training can be performed by 16 GPU asynchronous workers, and a batch size of 96.

Example Results: Example networks of the present disclosure were compared against MobileNetV1, ShuffleNet and NASNet-A models. For ShuffleNet, see Zhang et al., Sufflenet: An extremely efficient convolutional neural network for mobile devices. CoRR, abs/1707.01083, 2017. For NASNet-A, see Zoph et al., Learning Transferable architectures for scalable image recognition. CoRR, abs/1707.07012, 2017.

The statistics of a few selected models are provided in Table 4 with the full performance graph in FIG. 6. In particular, FIG. 6 shows performance curve of MobileNetV2 vs MobileNetV1, SuffleNet, and NAS. For all the MobileNetV2 networks, the multipliers 0.35, 0.5, 0.75, and 1.0 were used for all resolutions and an addition 1.4 for 224.

TABLE 4 Performance on ImageNet, comparison for different networks. As is common practice for ops, the total number Multiply-Adds is counted. In the last column, running time in ms is reported, for running these networks on a single large core of Pixel Phone, using proprietary optimized Tensorflow. ShuffleNet numbers are not reported as the framework does not yet support efficient group convolutions. Network Top 1 Params MAdds (M) CPU ms MobileNetVi 70.8 4.2M 575 123 ShuffleNet (1.5) 69.0 2.9M 292 — ShuffleNet (× 2) 70.9 4.4M 524 — NasNet-A 74.0 5.3M 564 192 MobileNetV2 71.5 3.4M 300 80 MobileNetV2 (1.4) 74.3 6.9M 585 149

6.2 Example Object Detection

As another example, a convolutional neural network that includes one or more of the structures described herein can be trained to perform object detection. For example, the Single Shot Detector (SSD) model can be modified to form a mobile-friendly variant, which can be referred to as “SSDLite”. In particular, all the regular convolutions can be replaced with separable convolutions (e.g., depthwise followed by 1×1 projection) in SSD prediction layers. This design is in line with the overall design of MobileNets and shown to be much more computationally efficient. Compared to regular SSD, SSDLite dramatically reduces both parameter count and computational cost, as shown in Table 5 below.

TABLE 5 Comparison of size and computational cost between SSD and SSDLite configured with MobilenetV2 and predicting 80 classes. Params (M) MAdd (B) SSD 14.8 1.25 SSDLite 2.1 0.35

The performance of MobileNetV2 and V1 as feature extractors for object detection was compared with a modified version of Single Shot Detector (SSD) on COCO dataset. These were also compared to YOLOv2 and original SSD (with VGG-16 as base network) as baselines.

For MobileNetV2, the first layer of SSDLite was attached to the intermediate expand layer of layer 15 (with output stride of 16), the second and rest of SSDLite layers were attached on top of the last layer (with output stride of 32). This setup is consistent with MobileNet V1 as the first and second layers were attached to base network feature map of same output strides.

Both MobileNet models were trained and evaluated with Open Source Tensorflow Object Detection API. The input resolution of both models was 320×320. Both mAP (COCO challenge metrics), number of parameters, and number of Multiply-Adds were benchmarked and compared. The results are shown in Table 6. MobileNetV2 SSDLite is not only the most efficient model but also the most accurate of the three. Notably, MobileNetV2 SSDLite is 20×more efficient and 10× smaller while still outperforms YOLOv2 on COCO dataset.

TABLE 6 Performance comparison of MobileNetV2 + SSDLite and other realtime detectors on COCO dataset object detection task. MobileNetV2 + SSDLite achieves competitive accuracy with significantly less parameters and computational complexity. All models are trained on trainva135k and evaluated on test-dev. Network mAP Params MAdd SSD300 23.2 36.1M 35.2B SSD512 26.8 36.1M 99.5B YOLOv2 21.6 50.7M 17.5B MNet V1 + SSDLite 22.2  5.1M  1.3B MNet V2 + SSDLite 22.1  4.3M  0.8B

6.3 Example Semantic Segmentation

As yet another example, a convolutional neural network that includes one or more of the structures described herein can be trained to perform semantic segmentation. For example, the MobileNet architecture can be employed as a feature extractor with DeepLabv3 (see Liang-Chieh Chen et al., Rethinking atrous convolution for semantic image segmentation. CoRR, abs/1706.05587, 2017).

In particular, MobileNet can be employed as feature extractor with DeepLabv3 for the task of semantic segmentation. DeepLabv3 adopts atrous convolution, a powerful tool to explicitly control the resolution of computed feature maps, and builds five parallel heads including (a) Atrous Spatial Pyramid Pooling module (ASPP) which contains three 3×3 convolution with different atrous rates, (b) 1×1 convolution head, and (c) Image-level features. The ratio of input image spatial resolution to final output resolution is denoted by output_stride, which is controlled by applying the atrous convolution properly. For semantic segmentation, output_stride=16 can be employed; or 8 for denser feature maps. Example experiments were conducted on the PASCAL VOC 2012 dataset, with extra annotated images and evaluation metric mIOU.

Three verticals were mainly experimented with: (1) different feature extractors, (2) simplifying the DeepLabv3 heads for faster computation, and (3) different inference strategies for boosting the performance. The main results are listed in Table 7 below. From the table, it can be observed that (a) the inference strategies, including multi-scale inputs and adding left-right flipped images, significantly increases the FLOPS and thus are not suitable for on-device applications, (b) using output_stride=16 is more efficient than output_stride=8 for less computation, (c) MobileNetV1 is already a powerful feature extractor and only requires about 4.9-5.7 times fewer FLOPS than ResNet-101 (e.g., mIOU: 78.56 vs 82.70, and FLOPS: 1983.80 vs 9741.18), (d) it is more efficient to build DeepLabv3 heads on top of the second last feature map of MobileNetV2 than the original last feature map, since second last feature map contains 320 channels instead of 1280, and by doing so, similar performance can be attained while requiring about 2.5 times fewer FLOPS than MobileNetV1 counterparts, and (e) DeepLabv3 heads are computationally expensive and removing the ASPP module significantly reduces the FLOPS with slight performance degradation. In the end, one candidate for on-device applications is identified in bold face in the table, which attains 75.32% mIOU and only requires 5.5B FLOPS (or 2.75 MAdds).

TABLE 7 MobileNet + DeepLabv3 inference strategy on the PASCAL VOC 2012 validation set. MNet V2*: Second last feature map is used for DeepLabv3 heads, which includes (1) Atrous Spatial Pyramid Pooling (ASPP) module, and (2) 1 × 1 convolution as well as image- pooling feature. OS: output stride that controls the output resolution of the segmentation map. MF: Multi-scale and left-right flipped inputs during test. All the models have been pretrained on COCO. The potential candidate for on-device applications is shown in bold face. PASCAL images have dimension 512 × 512 and atrous convolution allows us to control output feature resolution without increasing the number of parameters. Network OS ASPP MF mlOU Params MAdds MNet V1 16 ✓ 75.29 11.15M 14.25B 8 ✓ ✓ 78.56 11.15M 941.9B MNet V2* 16 ✓ 75.70  4.52M  5.8B 8 ✓ ✓ 78.42  4.52M   387B MNet V2* 16 75.32  2.11M  2.75B 8 ✓ 77.33  2.11M 152.6B ResNet-101 16 ✓ 80.49 58.16M  81.0B 8 ✓ ✓ 82.70 58.16M 4870.6B 

6.4 Additional Example Experiments

FIGS. 7A and 7B depict additional example experimental results for example embodiments of the present disclosure.

In particular, FIG. 7A illustrates the impact of non-linearity in the bottleneck layer. It has been theoretically presumed that the linear bottleneck models are strictly less powerful that models with non-linearities, because the activations can always operate in the linear regime with appropriate changes to biases and scaling. However, the example experimental results illustrated in FIG. 7A indicate that linear bottleneck in fact improves performance, indicating that non-linearity operator is not beneficial in the bottleneck's low-dimensional space.

FIG. 7B illustrates the impact of variations in residual blocks. In particular, the example experimental results illustrated in FIG. 7B demonstrate that shortcuts connecting bottleneck layers perform better than shortcuts connecting expanded layers.

7. Example Discussion

Aspects of the present disclosure are directed to a new network architecture that enables a family of models that push the state of the art at multiple performance points. A basic building unit—the bottleneck residual block has several properties that make it particularly suitable for mobile applications. It allows very memory-efficient inference and can utilize standard operations present in all neural frameworks.

For the ImageNet dataset, example architectures according to the present disclosure work for models ranging from 10 Million Mult-Adds to 700 Million Mult-Adds, improving on the state of the art. Additionally, the architectures are dramatically simpler than the previous state of the art based on automatic network search.

For object detection task, example networks according to the present disclosure outperformed state-of-art real-time detectors on COCO dataset both in terms of accuracy and model complexity. Notably, the architecture combined with a modified SSD detection module is 20× less computation and 10× less parameters than YOLOv2.

On the theoretical side: the proposed convolutional block has a unique property that allows separation of the network expressivity (encoded by expansion layers) from its capacity (encoded by bottleneck inputs).

8. Additional Disclosure

The technology discussed herein makes reference to servers, databases, software applications, and other computer-based systems, as well as actions taken and information sent to and from such systems. The inherent flexibility of computer-based systems allows for a great variety of possible configurations, combinations, and divisions of tasks and functionality between and among components. For instance, processes discussed herein can be implemented using a single device or component or multiple devices or components working in combination. Databases and applications can be implemented on a single system or distributed across multiple systems. Distributed components can operate sequentially or in parallel.

While the present subject matter has been described in detail with respect to various specific example embodiments thereof, each example is provided by way of explanation, not limitation of the disclosure. Those skilled in the art, upon attaining an understanding of the foregoing, can readily produce alterations to, variations of, and equivalents to such embodiments. Accordingly, the subject disclosure does not preclude inclusion of such modifications, variations and/or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. For instance, features illustrated or described as part of one embodiment can be used with another embodiment to yield a still further embodiment. Thus, it is intended that the present disclosure cover such alterations, variations, and equivalents. 

1-21. (canceled)
 22. A computing system comprising: one or more processors; and one or more non-transitory computer-readable media that store: a convolutional neural network configured to process an input image to generate a prediction, the convolutional neural network comprising: an initial convolutional layer configured to receive and process the input image to generate a first intermediate representation; a plurality of inverted residual bottleneck blocks arranged in a sequence one after another, the plurality of inverted residual bottleneck blocks configured to receive and process the first intermediate representation to generate a second intermediate representation, each of the plurality of inverted residual bottleneck blocks comprising one or more layer reps, each layer rep comprising: a convolutional layer configured to apply a depthwise convolution; a convolutional layer configured to apply a pointwise convolution; and a linear bottleneck layer; and one or more subsequent layers configured to receive and process the second intermediate representation to generate the prediction; and instructions that, when executed by the one or more processors, cause the computing system to process the input image with the convolutional neural network to generate the prediction.
 23. The computing system of claim 22, wherein the initial convolutional layer applies a three-by-three filter.
 24. The computing system of claim 22, wherein the initial convolutional layer comprises thirty-two channels.
 25. The computing system of claim 22, wherein the plurality of inverted residual bottleneck blocks comprises seven inverted residual bottleneck blocks.
 26. The computing system of claim 25, wherein each of at least a first sequential inverted residual bottleneck block, a second sequential inverted residual bottleneck block, and a fourth sequential inverted residual bottleneck block of the seven inverted residual bottleneck blocks apply three-by-three filters.
 27. The computing system of claim 25, wherein a first sequential inverted residual bottleneck block of the seven inverted residual bottleneck blocks has an expansion factor of one and each of a second, third, fourth, fifth, sixth, and seventh sequential inverted residual bottleneck block of the seven inverted residual bottleneck blocks has an expansion factor of six.
 28. The computing system of claim 22, wherein a first sequential inverted residual bottleneck block of the plurality of inverted residual bottleneck blocks comprises sixteen channels.
 29. The computing system of claim 22, wherein a second sequential inverted residual bottleneck block of the plurality of inverted residual bottleneck blocks comprises twenty-four channels.
 30. The computing system of claim 22, wherein a final sequential inverted residual bottleneck block of the plurality of inverted residual bottleneck blocks comprises three-hundred and twenty channels.
 31. The computing system of claim 22, wherein a first sequential inverted residual bottleneck block of the plurality of inverted residual bottleneck blocks comprises a single layer rep.
 32. The computing system of claim 22, wherein a second sequential inverted residual bottleneck block of the plurality of inverted residual bottleneck blocks comprises two layer reps.
 33. The computing system of claim 22, wherein a final sequential inverted residual bottleneck block of the plurality of inverted residual bottleneck blocks comprises a single layer rep.
 34. The computing system of claim 22, wherein a first sequential inverted residual bottleneck block of the plurality of inverted residual bottleneck blocks has two-thirds has many channels as a second sequential inverted residual bottleneck block of the plurality of inverted residual bottleneck blocks.
 35. The computing system of claim 22, wherein a first sequential inverted residual bottleneck block of the plurality of inverted residual bottleneck blocks has one-half has many layer reps as a second sequential inverted residual bottleneck block of the plurality of inverted residual bottleneck blocks.
 36. The computing system of claim 22, wherein the one or more subsequent layers perform at least one subsequent convolution and a pooling operation.
 37. One or more non-transitory computer-readable media that store: a convolutional neural network configured to process an input image to generate a prediction, the convolutional neural network comprising: an initial convolutional layer configured to receive and process the input image to generate a first intermediate representation; a plurality of inverted residual bottleneck blocks arranged in a sequence one after another, the plurality of inverted residual bottleneck blocks configured to receive and process the first intermediate representation to generate a second intermediate representation, each of the plurality of inverted residual bottleneck blocks comprising a linear layer and depthwise separable convolutional layers; and one or more subsequent layers configured to receive and process the second intermediate representation to generate the prediction; and instructions that, when executed by the one or more processors, cause the computing system to process the input image with the convolutional neural network to generate the prediction.
 38. The one or more non-transitory computer-readable media of claim 37, wherein the initial convolutional layer comprises thirty-two channels.
 39. The one or more non-transitory computer-readable media of claim 37, wherein the plurality of inverted residual bottleneck blocks comprises seven inverted residual bottleneck blocks.
 40. The one or more non-transitory computer-readable media of claim 39, wherein each of at least a first sequential inverted residual bottleneck block, a second sequential inverted residual bottleneck block, and a fourth sequential inverted residual bottleneck block of the seven inverted residual bottleneck blocks apply three-by-three filters.
 41. The one or more non-transitory computer-readable media of claim 39, wherein a first sequential inverted residual bottleneck block of the seven inverted residual bottleneck blocks has an expansion factor of one and each of a second, third, fourth, fifth, sixth, and seventh sequential inverted residual bottleneck block of the seven inverted residual bottleneck blocks has an expansion factor of six. 